package com.webservice.service;

import com.webservice.Response;
import com.webservice.entity.User;

import javax.jws.WebService;
import javax.ws.rs.*;
import java.util.List;

/**
 * Created with LXD
 *
 * @author:Luhui
 * @qq:729913162
 * @Date:2018-08-25
 * @Time:21:57
 */
@WebService
@Path("/users/")
public interface UserService {

    @GET
    @Path("/")
    List<User> getUsers();

    @DELETE
    @Path("{id}")
    Response delete(@PathParam("id") int id);

    @POST
    @Path("add")
    Response insert(User user);

    @PUT
    @Path("update")
    Response update(User user);

    @GET
    @Path("{id}")
    User getUser(@PathParam("id") int id);
}
